package sim.ring.gui.actions;

import org.eclipse.jface.action.Action;

import sim.ring.gui.RingingSimApp;
import sim.ring.gui.RingingSimManager;
import sim.ring.gui.dialogs.ConfigAppDialog;

public class ConfigAppAction extends Action {
	
	RingingSimApp r;

	public ConfigAppAction(RingingSimApp parent) {
		r = parent;
		setText(r.getLocalisedData("configAppAction", "&Config@Ctrl+K"));
		setToolTipText(r.getLocalisedData("configAppActionTooltip", "Configure the application"));
		setImageDescriptor(RingingSimManager.getIMGReg().getDescriptor("configIcon"));
	}
	
	@Override
	public void run() {
		super.run();
		ConfigAppDialog configApp = new ConfigAppDialog(r);
		configApp.open();
		r.setStatus(r.getLocalisedData("configDialogOpened", "Config dialog opened"));
	}
	
}
